<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/

$app->get('/', ['uses' => 'DefaultController@index']);
$app->get('/index.html', ['uses' => 'DefaultController@index']);
$app->get('/order.html', ['uses' => 'OrderController@index']);
$app->get('/goods.html', ['uses' => 'GoodsController@index']);
$app->get('/goods-pub.html', ['uses' => 'GoodsController@create']);
$app->get('/goods-update-{id}.html', ['uses' => 'GoodsController@update', function($id){}]);
$app->get('/product.html', ['uses' => 'ProductController@index']);
$app->get('/product-pub.html', ['uses' => 'ProductController@create']);
$app->get('/product-update-{id}.html', ['uses' => 'ProductController@update', function($id){}]);
$app->get('/product-brand.html', ['uses' => 'ProductController@brand']);
$app->get('/brand-create.html', ['uses' => 'ProductController@brandCreate']);
$app->get('/brand-update-{id}.html', ['uses' => 'ProductController@brandUpdate']);
$app->get('/product-category.html', ['uses' => 'ProductController@category']);
$app->get('/category-create.html', ['uses' => 'ProductController@categoryCreate']);
$app->get('/category-update-{id}.html', ['uses' => 'ProductController@categoryUpdate']);
$app->get('/article.html', ['uses' => 'ArticleController@index']);
$app->get('/article-pub.html', ['uses' => 'ArticleController@create']);
$app->get('/article-update-{id}.html', ['uses' => 'ArticleController@update', function($id){}]);
$app->get('/language.html', ['uses' => 'SetController@language']);
$app->get('/language-create.html', ['uses' => 'SetController@languageCreate']);
$app->get('/language-update-{id}.html', ['uses' => 'SetController@languageUpdate', function($id){}]);
$app->get('/color.html', ['uses' => 'SetController@color']);
$app->get('/color-create.html', ['uses' => 'SetController@colorCreate']);
$app->get('/color-update-{id}.html', ['uses' => 'SetController@colorUpdate', function($id){}]);
$app->get('/comment.html', ['uses' => 'CommentController@index']);
$app->get('/set-about.html', ['uses' => 'SetController@about']);
$app->get('/set-base.html', ['uses' => 'SetController@index']);
$app->get('/user.html', ['uses' => 'UserController@index']);
$app->get('/user-create.html', ['uses' => 'UserController@create']);
$app->get('/user-update-{id}.html', ['uses' => 'UserController@update', function($id){}]);
$app->get('/user-role.html', ['uses' => 'UserController@role']);
$app->get('/role-create.html', ['uses' => 'UserController@roleCreate']);
$app->get('/role-update-{id}.html', ['uses' => 'UserController@roleUpdate', function($id){}]);
$app->get('/user-rule.html', ['uses' => 'UserController@rule']);
$app->get('/rule-create.html', ['uses' => 'UserController@ruleCreate']);
$app->get('/rule-update-{id}.html', ['uses' => 'UserController@ruleUpdate', function($id){}]);


$app->post('/upload.html', ['uses' => 'DefaultController@upload']);
$app->post('/goods-save.html', ['uses' => 'GoodsController@save']);
$app->post('/goods-delete.html', ['uses' => 'GoodsController@delete']);
$app->post('/product-save.html', ['uses' => 'ProductController@save']);
$app->post('/product-delete.html', ['uses' => 'ProductController@delete']);
$app->post('/brand-save.html', ['uses' => 'ProductController@brandSave']);
$app->post('/brand-delete.html', ['uses' => 'ProductController@brandDelete']);
$app->post('/category-save.html', ['uses' => 'ProductController@categorySave']);
$app->post('/category-delete.html', ['uses' => 'ProductController@categoryDelete']);
$app->post('/article-save.html', ['uses' => 'ArticleController@save']);
$app->post('/article-delete.html', ['uses' => 'ArticleController@delete']);
$app->post('/language-save.html', ['uses' => 'SetController@languageSave']);
$app->post('/language-delete.html', ['uses' => 'SetController@languageDelete']);
$app->post('/color-save.html', ['uses' => 'SetController@colorSave']);
$app->post('/color-delete.html', ['uses' => 'SetController@colorDelete']);
$app->post('/comment-set.html', ['uses' => 'CommentController@set']);
$app->post('/comment-delete.html', ['uses' => 'CommentController@delete']);
$app->post('/user-save.html', ['uses' => 'UserController@save']);
$app->post('/user-set.html', ['uses' => 'UserController@set']);
$app->post('/user-delete.html', ['uses' => 'UserController@delete']);
$app->post('/role-save.html', ['uses' => 'UserController@roleSave']);
$app->post('/role-set.html', ['uses' => 'UserController@roleSet']);
$app->post('/role-delete.html', ['uses' => 'UserController@roleDelete']);
$app->post('/rule-save.html', ['uses' => 'UserController@ruleSave']);
$app->post('/rule-set.html', ['uses' => 'UserController@ruleSet']);
$app->post('/rule-delete.html', ['uses' => 'UserController@ruleDelete']);
